arize-phoenix 4.11.0__py3-none-any.whl → 4.12.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arize-phoenix
3
- Version: 4.11.0
3
+ Version: 4.12.0rc1
4
4
  Summary: AI Observability and Evaluation
5
5
  Project-URL: Documentation, https://docs.arize.com/phoenix/
6
6
  Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
@@ -5,7 +5,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
5
5
  phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
6
  phoenix/services.py,sha256=aTxhcOA1pZHB6U-B3TEcp6fqDF5oT0xCUvEUNMZVTUQ,5175
7
7
  phoenix/settings.py,sha256=cO-qgis_S27nHirTobYI9hHPfZH18R--WMmxNdsVUwc,273
8
- phoenix/version.py,sha256=MQuf3fbMpjUKJ6HrU3RU6E8TZHYxYwKcBl_cp_Aa-OQ,23
8
+ phoenix/version.py,sha256=vDTXhJ8GZFVcgTBE3Q26tNDA2kuyeZwK6HnXlO91H70,26
9
9
  phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
11
11
  phoenix/core/model.py,sha256=km_a--PBHOuA337ClRw9xqhOHhrUT6Rl9pz_zV0JYkQ,4843
@@ -60,9 +60,9 @@ phoenix/pointcloud/pointcloud.py,sha256=4zAIkKs2xOUbchpj4XDAV-iPMXrfAJ15TG6rlIYG
60
60
  phoenix/pointcloud/projectors.py,sha256=zO_RrtDYSv2rqVOfIP2_9Cv11Dc8EmcZR94xhFcBYPU,1057
61
61
  phoenix/pointcloud/umap_parameters.py,sha256=3UQSjrysVOvq2V4KNpTMqNqNiK0BsTZnPBHWZ4fyJtQ,1708
62
62
  phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- phoenix/server/app.py,sha256=KlvL1Rg9bC1khIip7Rv9ADR9mpEhCiu1in-8WLlw-bc,18647
63
+ phoenix/server/app.py,sha256=u8s2AEUUDsY1uIpk3d8cMVHnAL6N57Ulb-k88kVvbMA,19673
64
64
  phoenix/server/grpc_server.py,sha256=faktLxEtWGlCB1bPR4QwwTsRoQloahKMx0hAWqRGI5s,3379
65
- phoenix/server/main.py,sha256=GpjmstVb4o-xjg0u7t4z1WXRmdxWMOw_XhQ7tPc7Fd8,11113
65
+ phoenix/server/main.py,sha256=dRyODpwkNi_3as14fnZ8LWW_JLWtpXHldRy9SNjNtws,11251
66
66
  phoenix/server/prometheus.py,sha256=j9DHB2fERuq_ZKmwVaqR-9wx5WcPPuU1Cm5Bhg5241Y,2996
67
67
  phoenix/server/telemetry.py,sha256=T_2OKrxNViAeaANlNspEekg_Y5uZIFWvKAnpz8Aoqvk,2762
68
68
  phoenix/server/thread_server.py,sha256=dP6cm6Cf08jNhDA1TRlVZpziu1YgtPDmaeIJMm725eI,2154
@@ -184,7 +184,7 @@ phoenix/server/api/types/MimeType.py,sha256=Zpi6zCalkSFgsvhzvOs-O1gYA04usAi9H__Q
184
184
  phoenix/server/api/types/Model.py,sha256=991I3wKNFTwEOGR9PCmEVBg2Y9DuQR65SovU_8kzkVs,8085
185
185
  phoenix/server/api/types/NumericRange.py,sha256=afEjgF97Go_OvmjMggbPBt-zGM8IONewAyEiKEHRds0,192
186
186
  phoenix/server/api/types/PerformanceMetric.py,sha256=W92B7OghEOgzFvmY0LCqpgavHaQggTGshdgfD0yqHX4,350
187
- phoenix/server/api/types/Project.py,sha256=SzvfPHr3VAm4FjvNzIfLsCyRqnZDsms13Xe1zA00rd4,13343
187
+ phoenix/server/api/types/Project.py,sha256=R2_nart3H4m8QYRbBe-SRnYvIjH4BCipcj_tKe6GaC8,14516
188
188
  phoenix/server/api/types/PromptResponse.py,sha256=Q8HKtpp8GpUOcxPCzZpkkokidDd6u0aZOv_SuPZZd5Q,630
189
189
  phoenix/server/api/types/Retrieval.py,sha256=OhMK2ncjoyp5h1yjKhjlKpoTbQrMHuxmgSFw-AO1rWw,285
190
190
  phoenix/server/api/types/ScalarDriftMetricEnum.py,sha256=IUAcRPpgL41WdoIgK6cNk2Te38SspXGyEs-S1fY23_A,232
@@ -212,16 +212,24 @@ phoenix/server/static/apple-touch-icon-72x72.png,sha256=o_bsxRdNE9J6ciqXSvd8aJmd
212
212
  phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQKRVuR1fNizdV68hi5Pk,5686
213
213
  phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
214
214
  phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
215
- phoenix/server/static/index.css,sha256=KKGpx4iwF91VGRm0YN-4cn8oC-oIqC6HecoPf0x3ZM8,1885
216
- phoenix/server/static/index.js,sha256=zEiit1tVmnkPIG4f33wDlbC-G8mz0ubglGBiE2DE4D8,3536640
217
215
  phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
216
+ phoenix/server/static/.vite/manifest.json,sha256=HBf8Uvnr1-ERuZTBCdHFEF8tgiPQzhLFaK84vo0TmNQ,1929
217
+ phoenix/server/static/assets/components-C8sm_r1F.js,sha256=eU0wbaPT17BDumNQKBL-VMI4GcXSd_OmNKr7jkDNKJY,160991
218
+ phoenix/server/static/assets/index-BEKPzgQs.js,sha256=eo_7Yc0oaqrRnlXKnz8k3adfq0bFNH_mhO_JyHq7Dvc,7362
219
+ phoenix/server/static/assets/pages-bN7juCjh.js,sha256=nFAVGriGoDe-udTjwGwz31kU7dg3GETzC1snnT0fq8A,406291
220
+ phoenix/server/static/assets/vendor-CUDAPm8e.js,sha256=vgwuODjGR2Mb8FeNurZOmbQrvxkBnWMaHtdQ69soFqA,1355429
221
+ phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
222
+ phoenix/server/static/assets/vendor-arizeai-Do2HOmcL.js,sha256=YDx2XE1Zwly6oS6Xv_-B792_jpNZ0bN_gvRaHY35btA,290966
223
+ phoenix/server/static/assets/vendor-codemirror-CrdxOlMs.js,sha256=KMJHeNKQyBjzBzKZEiDvIpx1hjhlb6zgALnE7CCgfCs,357576
224
+ phoenix/server/static/assets/vendor-recharts-PKRvByVe.js,sha256=Uul1I5FtZKipkx1ku4y2OqWd86GiO4aB4dA9o_LJbvM,282859
225
+ phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
218
226
  phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
219
- phoenix/server/templates/index.html,sha256=S4z7qSoNSwnKFAH9r96AR-YJEyoKMd-VMWVlJ_IdzME,2039
227
+ phoenix/server/templates/index.html,sha256=lgWe7Smx5KT6XYqnLC2-ZJYtxCJIC-if0-_6TesO1_Q,3884
220
228
  phoenix/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
221
- phoenix/session/client.py,sha256=8dWs_-boxhrqJ-MQMkhXYYL_1YBDccz83nwirJdtBp0,32400
222
- phoenix/session/data_extractor.py,sha256=dwhiDu-ISaXr8UI9I-CszZhB5BlUNmdDopjFZvMIXMw,2101
229
+ phoenix/session/client.py,sha256=aq5AhgyoI-rJU5eTNFAk8SzdBl6hiZvj7fWrC09s4aI,32523
230
+ phoenix/session/data_extractor.py,sha256=gkEM3WWZAlWGMfRgQopAQlid4cSi6GNco-sdrGir0qc,2788
223
231
  phoenix/session/evaluation.py,sha256=aKeV8UVOyq3b7CYOwt3cWuLz0xzvMjX7vlEPILJ_fcs,5311
224
- phoenix/session/session.py,sha256=rjIuSSK2gAYIUPQTJc4E2ebew5o6I070FWRoFn4W3EI,26620
232
+ phoenix/session/session.py,sha256=1ZGR0pBmah8bqX353MDf4sq7XuK904EfxNLo0B9z_sU,26714
225
233
  phoenix/trace/__init__.py,sha256=ujk_uYjM8gmm-YqnyXxF-kekfwid0bcaPMTtNNcaw6U,407
226
234
  phoenix/trace/attributes.py,sha256=B_OrzVaxZwFkrAFXZyicYoIti1UdUysURsvUS2GyW1U,12488
227
235
  phoenix/trace/errors.py,sha256=wB1z8qdPckngdfU-TORToekvg3344oNFAA83_hC2yFY,180
@@ -258,8 +266,8 @@ phoenix/utilities/logging.py,sha256=lDXd6EGaamBNcQxL4vP1au9-i_SXe0OraUDiJOcszSw,
258
266
  phoenix/utilities/project.py,sha256=qWsvKnG1oKhOFUowXf9qiOL2ia7jaFe_ijFFHEt8GJo,431
259
267
  phoenix/utilities/re.py,sha256=PDve_OLjRTM8yQQJHC8-n3HdIONi7aNils3ZKRZ5uBM,2045
260
268
  phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
261
- arize_phoenix-4.11.0.dist-info/METADATA,sha256=0w3dc8vJIjxmwxzRI21vi5STtp5Gioffqy6k3EaqHAg,11452
262
- arize_phoenix-4.11.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
263
- arize_phoenix-4.11.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
264
- arize_phoenix-4.11.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
265
- arize_phoenix-4.11.0.dist-info/RECORD,,
269
+ arize_phoenix-4.12.0rc1.dist-info/METADATA,sha256=RrJgXQpDjiI30wmDKUZrcbBoM6vb3f2suCGJC4mtuQ0,11455
270
+ arize_phoenix-4.12.0rc1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
271
+ arize_phoenix-4.12.0rc1.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
272
+ arize_phoenix-4.12.0rc1.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
273
+ arize_phoenix-4.12.0rc1.dist-info/RECORD,,
@@ -262,6 +262,22 @@ class Project(Node):
262
262
  async with info.context.db() as session:
263
263
  return list(await session.scalars(stmt))
264
264
 
265
+ @strawberry.field(
266
+ description="Names of all available annotations for traces. "
267
+ "(The list contains no duplicates.)"
268
+ ) # type: ignore
269
+ async def trace_annotations_names(
270
+ self,
271
+ info: Info[Context, None],
272
+ ) -> List[str]:
273
+ stmt = (
274
+ select(distinct(models.TraceAnnotation.name))
275
+ .join(models.Trace)
276
+ .where(models.Trace.project_rowid == self.id_attr)
277
+ )
278
+ async with info.context.db() as session:
279
+ return list(await session.scalars(stmt))
280
+
265
281
  @strawberry.field(
266
282
  description="Names of all available evaluations for spans. "
267
283
  "(The list contains no duplicates.)"
@@ -280,6 +296,23 @@ class Project(Node):
280
296
  async with info.context.db() as session:
281
297
  return list(await session.scalars(stmt))
282
298
 
299
+ @strawberry.field(
300
+ description="Names of all available annotations for spans. "
301
+ "(The list contains no duplicates.)"
302
+ ) # type: ignore
303
+ async def span_annotation_names(
304
+ self,
305
+ info: Info[Context, None],
306
+ ) -> List[str]:
307
+ stmt = (
308
+ select(distinct(models.SpanAnnotation.name))
309
+ .join(models.Span)
310
+ .join(models.Trace, models.Span.trace_rowid == models.Trace.id)
311
+ .where(models.Trace.project_rowid == self.id_attr)
312
+ )
313
+ async with info.context.db() as session:
314
+ return list(await session.scalars(stmt))
315
+
283
316
  @strawberry.field(
284
317
  description="Names of available document evaluations.",
285
318
  ) # type: ignore
phoenix/server/app.py CHANGED
@@ -1,4 +1,6 @@
1
1
  import contextlib
2
+ from functools import cached_property
3
+ import json
2
4
  import logging
3
5
  from datetime import datetime
4
6
  from pathlib import Path
@@ -103,6 +105,8 @@ class AppConfig(NamedTuple):
103
105
  min_dist: float
104
106
  n_neighbors: int
105
107
  n_samples: int
108
+ is_development: bool
109
+ web_manifest_path: Path
106
110
 
107
111
 
108
112
  class Static(StaticFiles):
@@ -114,6 +118,22 @@ class Static(StaticFiles):
114
118
  self._app_config = app_config
115
119
  super().__init__(**kwargs)
116
120
 
121
+ @cached_property
122
+ def _web_manifest(self) -> Dict[str, Any]:
123
+ try:
124
+ with open(self._app_config.web_manifest_path, "r") as f:
125
+ return cast(Dict[str, Any], json.load(f))
126
+ except FileNotFoundError as e:
127
+ if self._app_config.is_development:
128
+ logger.warning(
129
+ f"Web manifest not found at {self._app_config.web_manifest_path}"
130
+ )
131
+ return {}
132
+ raise e
133
+
134
+ def _sanitize_basename(self, basename: str) -> str:
135
+ return basename[:-1] if basename.endswith("/") else basename
136
+
117
137
  async def get_response(self, path: str, scope: Scope) -> Response:
118
138
  response = None
119
139
  try:
@@ -132,9 +152,11 @@ class Static(StaticFiles):
132
152
  "min_dist": self._app_config.min_dist,
133
153
  "n_neighbors": self._app_config.n_neighbors,
134
154
  "n_samples": self._app_config.n_samples,
135
- "basename": request.scope.get("root_path", ""),
155
+ "basename": self._sanitize_basename(request.scope.get("root_path", "")),
136
156
  "platform_version": phoenix.__version__,
137
157
  "request": request,
158
+ "is_development": self._app_config.is_development,
159
+ "manifest": self._web_manifest
138
160
  },
139
161
  )
140
162
  except Exception as e:
@@ -379,6 +401,7 @@ def create_app(
379
401
  umap_params: UMAPParameters,
380
402
  corpus: Optional[Model] = None,
381
403
  debug: bool = False,
404
+ dev: bool = False,
382
405
  read_only: bool = False,
383
406
  enable_prometheus: bool = False,
384
407
  initial_spans: Optional[Iterable[Union[Span, Tuple[Span, str]]]] = None,
@@ -497,6 +520,8 @@ def create_app(
497
520
  min_dist=umap_params.min_dist,
498
521
  n_neighbors=umap_params.n_neighbors,
499
522
  n_samples=umap_params.n_samples,
523
+ is_development=dev,
524
+ web_manifest_path=SERVER_DIR / "static" / ".vite" / "manifest.json",
500
525
  ),
501
526
  ),
502
527
  name="static",
phoenix/server/main.py CHANGED
@@ -131,6 +131,8 @@ if __name__ == "__main__":
131
131
  parser.add_argument("--no-internet", action="store_true")
132
132
  parser.add_argument("--umap_params", type=str, required=False, default=DEFAULT_UMAP_PARAMS_STR)
133
133
  parser.add_argument("--debug", action="store_true")
134
+ # Whether the app is running in a development environment
135
+ parser.add_argument("--dev", action="store_true")
134
136
  subparsers = parser.add_subparsers(dest="command", required=True)
135
137
  serve_parser = subparsers.add_parser("serve")
136
138
  datasets_parser = subparsers.add_parser("datasets")
@@ -258,6 +260,7 @@ if __name__ == "__main__":
258
260
  if corpus_inferences is None
259
261
  else create_model_from_inferences(corpus_inferences),
260
262
  debug=args.debug,
263
+ dev=args.dev,
261
264
  read_only=read_only,
262
265
  enable_prometheus=enable_prometheus,
263
266
  initial_spans=fixture_spans,
@@ -0,0 +1,78 @@
1
+ {
2
+ "_components-C8sm_r1F.js": {
3
+ "file": "assets/components-C8sm_r1F.js",
4
+ "name": "components",
5
+ "imports": [
6
+ "_vendor-CUDAPm8e.js",
7
+ "_vendor-arizeai-Do2HOmcL.js",
8
+ "_pages-bN7juCjh.js",
9
+ "_vendor-three-DwGkEfCM.js",
10
+ "_vendor-codemirror-CrdxOlMs.js"
11
+ ]
12
+ },
13
+ "_pages-bN7juCjh.js": {
14
+ "file": "assets/pages-bN7juCjh.js",
15
+ "name": "pages",
16
+ "imports": [
17
+ "_vendor-CUDAPm8e.js",
18
+ "_components-C8sm_r1F.js",
19
+ "_vendor-arizeai-Do2HOmcL.js",
20
+ "_vendor-recharts-PKRvByVe.js",
21
+ "_vendor-codemirror-CrdxOlMs.js"
22
+ ]
23
+ },
24
+ "_vendor-!~{003}~.js": {
25
+ "file": "assets/vendor-DxkFTwjz.css",
26
+ "src": "_vendor-!~{003}~.js"
27
+ },
28
+ "_vendor-CUDAPm8e.js": {
29
+ "file": "assets/vendor-CUDAPm8e.js",
30
+ "name": "vendor",
31
+ "imports": [
32
+ "_vendor-three-DwGkEfCM.js"
33
+ ],
34
+ "css": [
35
+ "assets/vendor-DxkFTwjz.css"
36
+ ]
37
+ },
38
+ "_vendor-arizeai-Do2HOmcL.js": {
39
+ "file": "assets/vendor-arizeai-Do2HOmcL.js",
40
+ "name": "vendor-arizeai",
41
+ "imports": [
42
+ "_vendor-CUDAPm8e.js"
43
+ ]
44
+ },
45
+ "_vendor-codemirror-CrdxOlMs.js": {
46
+ "file": "assets/vendor-codemirror-CrdxOlMs.js",
47
+ "name": "vendor-codemirror",
48
+ "imports": [
49
+ "_vendor-CUDAPm8e.js"
50
+ ]
51
+ },
52
+ "_vendor-recharts-PKRvByVe.js": {
53
+ "file": "assets/vendor-recharts-PKRvByVe.js",
54
+ "name": "vendor-recharts",
55
+ "imports": [
56
+ "_vendor-CUDAPm8e.js"
57
+ ]
58
+ },
59
+ "_vendor-three-DwGkEfCM.js": {
60
+ "file": "assets/vendor-three-DwGkEfCM.js",
61
+ "name": "vendor-three"
62
+ },
63
+ "index.tsx": {
64
+ "file": "assets/index-BEKPzgQs.js",
65
+ "name": "index",
66
+ "src": "index.tsx",
67
+ "isEntry": true,
68
+ "imports": [
69
+ "_vendor-CUDAPm8e.js",
70
+ "_vendor-arizeai-Do2HOmcL.js",
71
+ "_components-C8sm_r1F.js",
72
+ "_pages-bN7juCjh.js",
73
+ "_vendor-three-DwGkEfCM.js",
74
+ "_vendor-codemirror-CrdxOlMs.js",
75
+ "_vendor-recharts-PKRvByVe.js"
76
+ ]
77
+ }
78
+ }